//-----------------------------------------------------------------------------
// File: Scene.hlsl
//
// Desc: Vertex shader for the scene.
// 
// Copyright (c) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------

cbuffer cbPerObject : register( b0 )
{
    row_major matrix    g_mWorldViewProjection    : packoffset( c0 );
}

struct SceneVS_Input
{
    float4 pos   : POSITION;
    float4 color : COLOR;
};

struct SceneVS_Output
{
    float4 pos        : SV_POSITION;
    float4 color    : COLOR0;
};

/**
    Both OIT and Non-OIT pixel shaders use this vertex shader.
*/
SceneVS_Output SceneVS( SceneVS_Input input )
{
    SceneVS_Output output;
    
    output.color = input.color;
    output.pos   = mul(input.pos, g_mWorldViewProjection );
    
    return output;
}

/**
    Non-OIT pass pixel shader.
*/
float4 ScenePS( SceneVS_Output input ) : SV_Target0
{
    //return float4( input.pos.x/320.0 , input.pos.y/240.0, 0, 1 );
    return float4( input.color.xyz, 0.5f );
}
